package com.imageflowpro.image_flow_pro.service;

import com.imageflowpro.image_flow_pro.dto.UserUploadImageDTO;
import com.imageflowpro.image_flow_pro.po.MediaImage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.imageflowpro.image_flow_pro.vo.UserUploadImageVO;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.core.io.InputStreamResource;
import org.springframework.http.ResponseEntity;

/**
 * <p>
 * 图片存储表 服务类
 * </p>
 *
 * @author 张家浩
 * @since 2025-05-07
 */
public interface IMediaImageService extends IService<MediaImage> {

    UserUploadImageVO userUploadImage(UserUploadImageDTO userUploadImageDTO);

    void getImageById(HttpServletResponse response, Long imageId);

    void deleteImageById(Long imageId);

    ResponseEntity<InputStreamResource> userDownloadImages(String orderId);

    ResponseEntity<InputStreamResource> adminDownloadImages(String orderId);

    ResponseEntity<InputStreamResource> adminWXDownloadImages(String orderId, String token);

    ResponseEntity<InputStreamResource> userWXDownloadImages(String orderId, String token);
}
